# -*- mode: python -*-
# vi: set ft=python :

# Copyright 2020 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_binary", "rt_ipynb_test")

rt_ipynb_test(
    name = "autapse_and_lstm",
    srcs = ["autapse_and_lstm.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "simple_legs",
    srcs = ["simple_legs.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "contact",
    srcs = ["contact.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "grid_world",
    srcs = ["grid_world.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "limit_cycles",
    srcs = ["limit_cycles.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "lqr",
    srcs = ["lqr.ipynb"],
    data = ["//underactuated/models:cartpole.urdf"],
    tags = ["flaky"],
    deps = [
        "//underactuated",
        "//underactuated:quadrotor2d",
    ],
)

rt_ipynb_test(
    name = "lyapunov",
    srcs = ["lyapunov.ipynb"],
    deps = ["//underactuated"],
)

# TODO(russt): Change from binary to test pending resolution of drake #13299.
rt_ipynb_binary(
    name = "miqp_planning",
    srcs = ["miqp_planning.ipynb"],
    tags = ["requires-network"],  # For gurobi license.
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "optimization",
    srcs = ["optimization.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "perching",
    srcs = ["perching.ipynb"],
    data = ["//underactuated/models/glider"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "spring_loaded_inverted_pendulum",
    srcs = ["spring_loaded_inverted_pendulum.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "stochastic",
    srcs = ["stochastic.ipynb"],
    deps = ["//underactuated"],
)

rt_ipynb_test(
    name = "trajectory_optimization",
    timeout = "moderate",
    srcs = ["trajectory_optimization.ipynb"],
    data = ["//underactuated/models:cartpole.urdf"],
    tags = ["requires-network"],  # For gurobi license.
    deps = [
        "//underactuated",
        "//underactuated:pendulum",
    ],
)
